
/*
*赛事相关接口
*/
//封装请求
import request from "@/utils/request.js";
//基础配置
import APP from '@/config/app.js'
//活动人口
const Qualifying = APP.Qualifying;
//实例化
const url = request.request;

//首页
 function getindexdataapi(data ={}) {
	data['m'] = 'qualifying';//模型
	data['c'] = 'index';//控制器
	data['op'] = 'getindexdata';//方法
	return  url.post(Qualifying, data);
}

//得到奖品
 function getPrizeListapi(data ={}) {
	data['m'] = 'qualifying';//模型
	data['c'] = 'prize';//控制器
	data['op'] = 'getPrizeList';//方法
	return  url.post(Qualifying, data);
}

 
 //得到赛季列表
  function getSeasonListapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'season';//控制器
 	data['op'] = 'getSeasonList';//方法
 	return  url.post(Qualifying, data);
 }
  
  //得到赛事列表
   function getMakeListapi(data ={}) {
  	data['m'] = 'qualifying';//模型
  	data['c'] = 'make';//控制器
  	data['op'] = 'getMakeList';//方法
  	return  url.post(Qualifying, data);
  }
  //得到赛事详情
   function getMakeapi(data ={}) {
  	data['m'] = 'qualifying';//模型
  	data['c'] = 'make';//控制器
  	data['op'] = 'getMake';//方法
  	return  url.post(Qualifying, data);
  }
  //得到赛事参赛列表
   function getMakeUserListapi(data ={}) {
  	data['m'] = 'qualifying';//模型
  	data['c'] = 'make';//控制器
  	data['op'] = 'getMakeUserList';//方法
  	return  url.post(Qualifying, data);
  }
  
  
  //得到项目列表
   function getMakeProjectListapi(data ={}) {
  	data['m'] = 'qualifying';//模型
  	data['c'] = 'project';//控制器
  	data['op'] = 'getMakeProjectList';//方法
  	return  url.post(Qualifying, data);
  }
  
  //得到赛事排名
   function getMakeRankingapi(data ={}) {
  	data['m'] = 'qualifying';//模型
  	data['c'] = 'make';//控制器
  	data['op'] = 'getMakeRanking';//方法
  	return  url.post(Qualifying, data);
  }

 //参加赛事
  function setApplicationapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'make';//控制器
 	data['op'] = 'setApplication';//方法
 	return  url.post(Qualifying, data);
 }
 
 //得到项目列表
  function getSeasonAndMakeListapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'season';//控制器
 	data['op'] = 'getSeasonAndMakeList';//方法
 	return  url.post(Qualifying, data);
 }
 
 //得到用户名下奖品列表
  function getUserPrizeapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'prize';//控制器
 	data['op'] = 'getUserPrize';//方法
 	return  url.post(Qualifying, data);
 }
 
 
 //支付
  function getPayParameterapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'pay';//控制器
 	data['op'] = 'getPayParameter';//方法
 	return  url.post(Qualifying, data);
 }
 //得到项目配置
  function getMakeProjecParameterapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getMakeProjecParameter';//方法
 	return  url.post(Qualifying, data);
 }
 //得到项目题库
  function getMakeProjecTikuapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getMakeProjecTiku';//方法
 	return  url.post(Qualifying, data);
 }
 //提交分数
  function setProjectUserAchievementapi(data ={}) {
 	data['m'] = 'qualifying';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'setProjectUserAchievement';//方法
 	return  url.post(Qualifying, data);
 } 

export default {
	getPrizeListapi,
	getindexdataapi,
	getSeasonListapi,
	getMakeListapi,
	getMakeProjectListapi,
	getMakeapi,
	getMakeUserListapi,
	getMakeRankingapi,
	setApplicationapi,
	getSeasonAndMakeListapi,
	getUserPrizeapi,
	getPayParameterapi,
	getMakeProjecParameterapi,
	getMakeProjecTikuapi,
	setProjectUserAchievementapi,
}